/// RoleUpdateDto
class RoleUpdateDto {
  /// 角色ID
  final int roleId;
  /// 角色名称
  final String roleName;
  /// 该角色可访问的菜单的ID列表
  final List<int> menuIdList;

  RoleUpdateDto({
    required this.roleId,
    required this.roleName,
    required this.menuIdList,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['roleId'] = roleId;
    data['roleName'] = roleName;
    data['menuIdList'] = menuIdList;
    return data;
  }

  factory RoleUpdateDto.fromJson(Map<String, dynamic> json) {
    return RoleUpdateDto(
      roleId: json['roleId'],
      roleName: json['roleName'],
      menuIdList: json['menuIdList'] != null ? (json['menuIdList'] as List).map<int>((e) => e as int).toList() : [],
    );
  }
}